home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / CMPLTPAS / CODEMARK.PAS < prev    next >
Pascal/Delphi Source File  |  1988-08-01  |  1KB  |  20 lines

  1. {->>>>CodeMark<<<<---------------------------------------------}
  2. {                                                              }
  3. { Filename : CODEMARK.SRC -- Last Modified 2/14/88             }
  4. {                                                              }
  5. { This is an INLINE macro that returns a pointer to the code   }
  6. { that comprises the start of the next statement.  This        }
  7. { pointer may then be passed to VarDump to display a hexdump   }
  8. { of that region of code.                                      }
  9. {                                                              }
  10. {     From: COMPLETE TURBO PASCAL 5.0  by Jeff Duntemann       }
  11. {    Scott, Foresman & Co., Inc. 1988   ISBN 0-673-38355-5     }
  12. {--------------------------------------------------------------}
  13.  
  14. FUNCTION CodeMark : Pointer;
  15.  
  16. INLINE($8C/$CA/       { MOV DX,CS | Put code segment in DX  }
  17.        $E8/$00/$00/   { CALL 0    | Push next address onto stack  }
  18.        $58/           { POP AX    | Pop address offset (IP) into AX  }
  19.        $05/$0B/$00);  { ADD AX,7  | Increment AX past assignment code  }
  20.